package com.dfd.common.mq.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * <b><code>MqRecord</code></b>
 * <p/>
 * Description
 * <p/>
 * <b>Creation Time:</b> 2023/2/8 22:28.
 *
 * @author DFD
 * @since rocketmq-springboot-test ${PROJECT_VERSION}
 */
@Data
@Builder
@TableName(value = "mq_record")
public class MqRecord {
    public static final String COL_ID = "id";
    public static final String COL_MSG_ID = "msg_id";
    public static final String COL_BUSINESS_ID = "business_id";
    public static final String COL_CONTENT = "content";
    public static final String COL_TOPIC = "topic";
    public static final String COL_TAG = "tag";
    public static final String COL_CREATE_TIME = "create_time";
    public static final String COL_CONSUMER_TIME = "consumer_time";
    public static final String COL_CONSUMER_STATUS = "consumer_status";
    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 消息的唯一ID
     */
    @TableField(value = "msg_id")
    private String msgId;
    /**
     * 业务ID
     */
    @TableField(value = "business_id")
    private Long businessId;
    /**
     * 消息内容
     */
    @TableField(value = "content")
    private String content;
    /**
     * 消息主题
     */
    @TableField(value = "topic")
    private String topic;
    /**
     * 消息标签
     */
    @TableField(value = "tag")
    private String tag;
    /**
     * 消息创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;
    /**
     * 消息消费时间
     */
    @TableField(value = "consumer_time")
    private Date consumerTime;
    /**
     * 消费状态 0为未消费，1为已消费
     */
    @TableField(value = "consumer_status")
    private Boolean consumerStatus;
}
